
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>APK结构 · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.2">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="File_architecture_runtime.html" />
    
    
    <link rel="prev" href="Project_architectured.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" >
            
                <span>
            
                    
                    原理解析
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="Runtime_principle.html">
            
                <a href="Runtime_principle.html">
            
                    
                    框架原理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="Project_architectured.html">
            
                <a href="Project_architectured.html">
            
                    
                    名词解释
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.2.3" data-path="Apk_architecture.html">
            
                <a href="Apk_architecture.html">
            
                    
                    APK结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="File_architecture_runtime.html">
            
                <a href="File_architecture_runtime.html">
            
                    
                    运行期文件结构
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../guide-for-use/">
            
                <a href="../guide-for-use/">
            
                    
                    接入指引
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../guide-for-use/guide_for_build.html">
            
                <a href="../guide-for-use/guide_for_build.html">
            
                    
                    容器接入
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../guide-for-use/guide_for_bundle.html">
            
                <a href="../guide-for-use/guide_for_bundle.html">
            
                    
                    bundle拆分|新建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../guide-for-use/guide_for_compile.html">
            
                <a href="../guide-for-use/guide_for_compile.html">
            
                    
                    awo编译
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../guide-for-use/bundleCommunicate.html">
            
                <a href="../guide-for-use/bundleCommunicate.html">
            
                    
                    跨bundle的代码重用和通信
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../update/">
            
                <a href="../update/">
            
                    
                    动态部署
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../update/principle.html">
            
                <a href="../update/principle.html">
            
                    
                    技术原理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../update/dexpatch.html">
            
                <a href="../update/dexpatch.html">
            
                    
                    dexpatch
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../update/dexpatch_use_guide.html">
            
                <a href="../update/dexpatch_use_guide.html">
            
                    
                    dexpatch使用教程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="../update/guide.html">
            
                <a href="../update/guide.html">
            
                    
                    一些限制
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" >
            
                <span>
            
                    
                    FAQ
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../faq/question.html">
            
                <a href="../faq/question.html">
            
                    
                    问答
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../faq/help.html">
            
                <a href="../faq/help.html">
            
                    
                    故障排查
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../faq/variant.html">
            
                <a href="../faq/variant.html">
            
                    
                    构建定制包
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="../faq/dynamic_failed_help.html">
            
                <a href="../faq/dynamic_failed_help.html">
            
                    
                    动态部署失败排查指南
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" >
            
                <span>
            
                    
                    源码分析
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../code_read/atlas_gradle_apk/atlas_atlas_gradle_apk.html">
            
                <a href="../code_read/atlas_gradle_apk/atlas_atlas_gradle_apk.html">
            
                    
                    Atlas之Gradle配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../code_read/atlas_start/atlas_start_1.html">
            
                <a href="../code_read/atlas_start/atlas_start_1.html">
            
                    
                    Atlas之启动过程(一)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../code_read/atlas_start/atlas_start_2.html">
            
                <a href="../code_read/atlas_start/atlas_start_2.html">
            
                    
                    Atlas之启动过程(二)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../code_read/atlas_bundle_load/atlas_bundle_load.html">
            
                <a href="../code_read/atlas_bundle_load/atlas_bundle_load.html">
            
                    
                    Atlas之Bundle加载过程
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >APK结构</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="apk&#x7ED3;&#x6784;">APK&#x7ED3;&#x6784;</h1>
<p>&#x57FA;&#x4E8E;Atlas&#x6784;&#x5EFA;&#x540E;&#x7684;APK&#x7ED3;&#x6784;&#x5982;&#x4E0B;&#x56FE;&#xFF0C;host&#x4E0E;&#x666E;&#x901A;Apk&#x65E0;&#x5F02;&#xFF0C;&#x4F46;&#x662F;Manifest&#x548C;assets&#x4F1A;&#x6DFB;&#x52A0;&#x4E00;&#x4E9B;&#x989D;&#x5916;&#x7684;&#x5185;&#x5BB9;&#xFF0C;&#x540C;&#x65F6;&#x5728;armeabi&#x76EE;&#x5F55;&#x4E2D;&#x4F1A;&#x589E;&#x52A0;&#x82E5;&#x5E72;&#x4E2A;bundle&#x6784;&#x5EFA;&#x7684;&#x4EA7;&#x7269;&#xFF0C;&#x53D6;&#x540D;&#x4E3A;String.format(lib%s.so,packagename.replace(&quot;.&quot;,&quot;_&quot;))&#xFF1B;packagename&#x4E3A;bundle&#x7684;AndroidManifest&#x4E2D;&#x7684;packagename,&#x8FD9;&#x4E9B;so&#x90FD;&#x662F;&#x6B63;&#x5E38;&#x7684;apk&#x7ED3;&#x6784;&#xFF0C;&#x6539;&#x4E3A;so&#x653E;&#x5165;lib&#x76EE;&#x5F55;&#x53EA;&#x662F;&#x4E3A;&#x4E86;&#x5B89;&#x88C5;&#x65F6;&#x501F;&#x7528;&#x7CFB;&#x7EDF;&#x7684;&#x80FD;&#x529B;&#x4ECE;apk&#x4E2D;&#x89E3;&#x538B;&#x51FA;&#x6765;&#xFF0C;&#x65B9;&#x4FBF;&#x540E;&#x7EED;&#x5B89;&#x88C5;
&gt;
<img src="Project_architectured_img/apk_struct.png" alt="MacDown Screenshot"></p>
<h2 id="assetsbundleinfo-versionjson">assets/bundleinfo-version.json</h2>
<p>&#x6784;&#x5EFA;&#x5B8C;&#x7684;apk&#x5728;host&#x7684;assets&#x76EE;&#x5F55;&#x4E0B;&#xFF0C;&#x4F1A;&#x6709;&#x4E2A;bundleinfo-verison.json&#x7684;&#x6587;&#x4EF6;&#xFF0C;&#x5176;&#x4E2D;version&#x4E3A;manifest&#x4E2D;&#x7684;versinonname&#xFF0C;&#x91CC;&#x9762;&#x8BB0;&#x5F55;&#x4E86;&#x6BCF;&#x4E2A;bundle&#x5927;&#x5C0F;&#xFF0C;&#x7248;&#x672C;&#xFF0C;&#x540D;&#x5B57;&#x4EE5;&#x53CA;&#x91CC;&#x9762;&#x6240;&#x6709;&#x7684;component&#x4FE1;&#x606F;&#xFF0C;&#x8FD9;&#x4E9B;&#x5185;&#x5BB9;&#x5728;&#x6784;&#x5EFA;&#x7684;&#x65F6;&#x5019;&#x751F;&#x6210;&#xFF0C;&#x57FA;&#x4E8E;&#x8FD9;&#x4E9B;&#x4FE1;&#x606F;&#x6BCF;&#x4E2A;bundle&#x53EF;&#x4EE5;&#x5728;component&#x88AB;&#x89E6;&#x53D1;&#x7684;&#x65F6;&#x5019;&#x53BB;&#x6309;&#x9700;&#x7684;&#x8FDB;&#x884C;&#x5B89;&#x88C5;&#xFF0C;&#x6574;&#x4E2A;&#x8FC7;&#x7A0B;&#x5BF9;&#x5F00;&#x53D1;&#x8005;&#x900F;&#x660E;&#xFF08;&#x4ECE;&#x4E2D;&#x4E5F;&#x53EF;&#x4EE5;&#x770B;&#x5230;&#x9ED8;&#x8BA4;&#x60C5;&#x51B5;&#x4E0B;bundle&#x5BF9;&#x5916;&#x66B4;&#x9732;&#x7684;&#x53EA;&#x662F;&#x57FA;&#x4E8E;Android&#x539F;&#x751F;&#x7684;Activity&#xFF0C;service&#xFF0C;receiver&#x7B49;component&#xFF09;&#x3002;
&gt;
<img src="Project_architectured_img/bundleinfo.png" alt="MacDown Screenshot"></p>
<h2 id="androidmanifest">AndroidManifest</h2>
<p>bundleinfo&#x7684;&#x4FE1;&#x606F;&#x540C;&#x65F6;&#x4E5F;&#x4F1A;&#x5728;&#x6784;&#x5EFA;&#x540E;&#x7684;&#x4E3B;manifest&#x91CC;&#x9762;&#x4F53;&#x73B0;&#xFF0C;&#x5982;&#x7EBF;&#x6846;1&#x3001;2&#x6240;&#x793A;&#xFF0C;&#x6BCF;&#x4E2A;component&#x4E0B;&#x9762;meta-datal&#x91CC;&#x9762;&#x8BB0;&#x5F55;&#x8BE5;component&#x6240;&#x5728;&#x7684;meta-data,&#x540C;&#x65F6;bundle&#x67D0;&#x4E9B;&#x7279;&#x6709;&#x7684;&#x4FE1;&#x606F;&#x4F1A;&#x8BB0;&#x5F55;&#x5728;application&#x7EA7;&#x522B;&#x7684;meta-data&#x91CC;&#x9762;&#x3002;
&gt;
<img src="Project_architectured_img/manifest.png" alt="MacDown Screenshot"></p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="Project_architectured.html" class="navigation navigation-prev " aria-label="Previous page: 名词解释">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="File_architecture_runtime.html" class="navigation navigation-next " aria-label="Next page: 运行期文件结构">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"APK结构","level":"1.2.3","depth":2,"next":{"title":"运行期文件结构","level":"1.2.4","depth":2,"path":"principle-intro/File_architecture_runtime.md","ref":"principle-intro/File_architecture_runtime.md","articles":[]},"previous":{"title":"名词解释","level":"1.2.2","depth":2,"path":"principle-intro/Project_architectured.md","ref":"principle-intro/Project_architectured.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":["livereload"],"pluginsConfig":{"livereload":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"principle-intro/Apk_architecture.md","mtime":"2017-09-12T02:32:41.000Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-11-27T10:00:49.012Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

